package cpi.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cpi.entity.Cpi;
import cpi.entity.PredictModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * (Cpi)表数据库访问层
 *
 * @author makejava
 * @since 2022-07-07 11:25:08
 */
@Repository
public interface CpiDao extends BaseMapper<Cpi> {
    List<Map<String,Object>> byprovince(@Param("list") List<String> m, @Param("page") int page, @Param("size")int size,@Param("type") String type);
    List<Map<String, Object>> bytype(@Param("list")List<String> m,@Param("province")String province);
    List<String> alltype();
    List<String> allprovince();

    List<Cpi> listPage(
            @Param("page") int page,
            @Param("size") int size,
            @Param("type") String type,
            @Param("province") String province);

    int counts(
            @Param("type") String type,
            @Param("province") String province);

    int add(@Param("cpi") Cpi cpi);

    Map<String, Object> predict(
            @Param("list") List<String> m,
            @Param("type") String type,
            @Param("province") String province);
}

